package com.exposit.books.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.exposit.books.dao.OrderDAO;
import com.exposit.books.domain.Order;

@Service
@Transactional
public class OrderServiceImpl implements OrderService{

	@Autowired
	private OrderDAO orderDAO;
	
	@Override
	public List<Order> getAll() {
		// TODO Auto-generated method stub
		return orderDAO.getAll();
	}

	@Override
	public Order getOrderByID(Long id) {
		// TODO Auto-generated method stub
		return orderDAO.getById(id);
	}

	@Override
	public void updateOrder(Order order) {
		// TODO Auto-generated method stub
		orderDAO.update(order);
	}

}
